<extend name="Public/common"/>
<block name="othercss">

</block>
<block name="header">
<div class="header">
    <div class="clearfix box">
        <!--<a class="save">保存</a>-->
        <a class="return" href="javascript:history.back(-1)"><i class="return-icon"></i></a>
        <h2>交易评价</h2>
    </div>
</div>
</block>
<block name="body">

<!--end header-->
<div class="container bgsum">
    <!--vip2_sum li.on表示已完成的订单-->
    <ul class="vip2_sum ">
        <li class="pro_list">
            <!--单个商品-->
            <a class="pro-cell clearfix">
                <img src="__ROOT__{$model.goods_picture}"/>
                <div class="lans clearfix">
                    <div class="right">
                        <div class="price">¥ {$model.goods_price}</div>
                        <div class="number">x {$model.goods_num}</div>
                    </div>
                    <div class="left">
                        <div class="title twos">{$model.goods_name}</div>
                        <div class="mess">{$model.goods_spec}</div>
                    </div>
                </div>
            </a>
        </li>
    </ul>
    <div class="box">
        <div class="textarea">
            <textarea class="pj"  placeholder="留言内容（十个字以上）" name="detail" id="detail"  onKeyUp="javascript:checkWord(this);"></textarea>
            <input type="hidden" name="comment_id" id="comment_id" value="{$model.id}" />
            <p>还可以输入<span  id="wordCheck">150</span>字</p>
        </div>
        <div class="submint_pj"><a class="sub_tijiao2">提交评价</a></div>
        <!--<input type="submit" class="sub_tijiao" value="提交评价"/>-->
    </div>
</div>


</block>
<block name="otherjs">
<script type="text/javascript">
function checkWord(which) { 
var maxChars = 150; 

if(which.value.length>=10){
  $('.submint_pj a').addClass('sub_tijiao').removeClass('sub_tijiao2');
}else{
 $('.submint_pj a').removeClass('sub_tijiao').addClass('sub_tijiao2');
}

if (which.value.length > maxChars) 
which.value = which.value.substring(0,maxChars); 
var curr = maxChars - which.value.length; 
$("#wordCheck").html(curr.toString()); 
} 

$(function(){
$('.submint_pj a').bind('click',function(){
 if( $(this).hasClass("sub_tijiao")){
    comment_add()
  }else{
   layer.tips('留言内容必须十个字以上', "#detail", { time: 1000, tips: [1,'#dd2727'] });
   return false;
    
  }
})	
})

</script>
 <script type="text/javascript">
            var url_comment_add = "{:urlrotue('Member/comment_add')}?";
            var url_comment_record = "{:urlrotue('comment_record')}?";
        </script>
         <script src="{$theme_path}/js/member_comment.js?20181208_3"></script>
</block>



